package com.dailyblue.java.project.oa.department.controller;

import com.dailyblue.java.project.oa.commons.bean.Department;
import com.dailyblue.java.project.oa.commons.service.DepartmentService;
import com.dailyblue.java.project.oa.commons.util.JsonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/department")
public class DepartmentController {
    @Resource
    private DepartmentService departmentService;
    @GetMapping
    public JsonResult find(){
        return departmentService.find();
    }
}
